#region Microsoft Public License
/*
 * (c) Copyright Chenjun Wu. http://utablesdk.codeplex.com
 * 
 * This source is subject to the Microsoft Public License (Ms-PL).
 * Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.
 * All other rights reserved.
 */
#endregion

﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using UTable.Input;
using UTable.Input.MultiTouch;
using UTable.Objects;
using UTable.Objects.Controls;

namespace UTable.Objects
{
	/// <summary>
	/// Interaction logic for UPhoto.xaml
	/// </summary>
	public partial class UPhoto : UObject
	{
		public UPhoto()
		{
			InitializeComponent();
			this.DataContext = this;
		}

		public String Path
		{
			get { return (String)GetValue(PathProperty); }
			set { SetValue(PathProperty, value); }
		}

		public static readonly DependencyProperty PathProperty =
			DependencyProperty.Register("Path", typeof(String), typeof(UPhoto), new UIPropertyMetadata(string.Empty));

		public override void OnMessageReceived(object message)
		{
			base.OnMessageReceived(message);
			if (message is String)
			{
				this.Path = message as string;
			}
		}

	}
}
